Skip to content

test(demo): add regression test for oneOf to allOf-composed schemas in requestBody#1396

Merged
sserrata merged 1 commit intomainfrom
test/oneof-ref-allof-requestbody-regression
Apr 7, 2026
Merged

test(demo): add regression test for oneOf to allOf-composed schemas in requestBody#1396
sserrata merged 1 commit intomainfrom
test/oneof-ref-allof-requestbody-regression

Conversation

@sserrata
Copy link
Copy Markdown
Member

@sserrata sserrata commented Apr 7, 2026

Summary

  • Adds a regression test case to demo/examples/tests/oneOf.yaml covering the pattern reported in Request Body Schemas Using allOf/oneOf/$ref Not Rendered in UI #1241
  • The test exercises requestBody.schema.oneOf → $ref → allOf → $ref → base schema — a chain that previously failed to render composed properties
  • Confirmed working against the current codebase; both tabs (UploadRequest and UploadRequestTemplate) render all properties with correct required markers and enum values

Test plan

  • Run yarn gen-api in demo/ and verify the new oneOf with $ref to allOf-composed schemas in requestBody endpoint appears under the oneOf sidebar category
  • Navigate to the endpoint and confirm UploadRequest tab shows all 5 properties (4 inherited + contentType)
  • Confirm UploadRequestTemplate tab shows all 4 base properties

Closes #1241

🤖 Generated with Claude Code

…mas in requestBody

Covers the pattern reported in issue #1241 where oneOf → $ref → allOf → $ref
chains were not rendering composed properties in the request body section.
Confirmed fixed; test guards against future regressions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Size Change: +4.27 kB (+0.19%)

Total Size: 2.27 MB

Filename Size Change
demo/.docusaurus/globalData.json 69.2 kB +591 B (+0.86%)
demo/.docusaurus/registry.js 100 kB +861 B (+0.87%)
demo/.docusaurus/routes.js 94.6 kB +789 B (+0.84%)
demo/.docusaurus/routesChunkNames.json 39.3 kB +336 B (+0.86%)
demo/build/assets/js/main.********.js 671 kB +1.56 kB (+0.23%)
demo/build/assets/js/runtime~main.********.js 23.2 kB +140 B (+0.61%)
ℹ️ View Unchanged
Filename Size
demo/.docusaurus/codeTranslations.json 2 B
demo/.docusaurus/docusaurus.config.mjs 16.1 kB
demo/.docusaurus/i18n.json 372 B
demo/.docusaurus/site-metadata.json 1.57 kB
demo/build/assets/css/styles.********.css 171 kB
demo/build/index.html 95.8 kB
demo/build/petstore/add-pet/index.html 30 kB
demo/build/petstore/create-user/index.html 24.7 kB
demo/build/petstore/create-users-with-array-input/index.html 24.8 kB
demo/build/petstore/create-users-with-list-input/index.html 24.8 kB
demo/build/petstore/delete-order/index.html 24.6 kB
demo/build/petstore/delete-pet/index.html 24.8 kB
demo/build/petstore/delete-user/index.html 25 kB
demo/build/petstore/find-pets-by-status/index.html 25.5 kB
demo/build/petstore/find-pets-by-tags/index.html 26.2 kB
demo/build/petstore/get-inventory/index.html 23.8 kB
demo/build/petstore/get-order-by-id/index.html 24.8 kB
demo/build/petstore/get-pet-by-id/index.html 25.6 kB
demo/build/petstore/get-user-by-name/index.html 25.1 kB
demo/build/petstore/login-user/index.html 25.7 kB
demo/build/petstore/logout-user/index.html 24.4 kB
demo/build/petstore/new-pet/index.html 25 kB
demo/build/petstore/pet/index.html 23.2 kB
demo/build/petstore/place-order/index.html 24.1 kB
demo/build/petstore/schemas/apiresponse/index.html 25.3 kB
demo/build/petstore/schemas/cat/index.html 39.1 kB
demo/build/petstore/schemas/category/index.html 26.3 kB
demo/build/petstore/schemas/dog/index.html 39.3 kB
demo/build/petstore/schemas/honeybee/index.html 39.4 kB
demo/build/petstore/schemas/id/index.html 23.4 kB
demo/build/petstore/schemas/order/index.html 27.4 kB
demo/build/petstore/schemas/pet/index.html 38.9 kB
demo/build/petstore/schemas/tag/index.html 24.7 kB
demo/build/petstore/schemas/user/index.html 40.8 kB
demo/build/petstore/store/index.html 22.2 kB
demo/build/petstore/subscribe-to-the-store-events/index.html 30.9 kB
demo/build/petstore/swagger-petstore-yaml/index.html 30.9 kB
demo/build/petstore/update-pet-with-form/index.html 25 kB
demo/build/petstore/update-pet/index.html 25.4 kB
demo/build/petstore/update-user/index.html 25 kB
demo/build/petstore/upload-file/index.html 24.8 kB
demo/build/petstore/user/index.html 22.9 kB

compressed-size-action

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Visit the preview URL for this PR (updated for commit 414f4fc):

https://docusaurus-openapi-36b86--pr1396-n1e80d8e.web.app

(expires Tue, 14 Apr 2026 17:35:31 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: bf293780ee827f578864d92193b8c2866acd459f

@sserrata sserrata merged commit 19c671c into main Apr 7, 2026
11 checks passed
@sserrata sserrata deleted the test/oneof-ref-allof-requestbody-regression branch April 7, 2026 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Request Body Schemas Using allOf/oneOf/$ref Not Rendered in UI

1 participant